﻿@model KPIS.GERP.Models.ICM.MasPurchaseMethod
@{
    var MasPurchaseMethodService= new KPIS.GERP.WEB.GIMS.IcmMasterService.IcmMasterServiceClient();
}

@if (ViewContext.RouteData.Values["action"].ToString().ToLower() == "edit")
{
@Html.HiddenFor(model => model.PcMethodId)
}
@Html.HiddenFor(model => model.RecordStatus)
@Html.HiddenFor(model => model.CreatedBy)
@Html.HiddenFor(model => model.CreatedWhen)
@Html.HiddenFor(model => model.UpdatedBy)
@Html.HiddenFor(model => model.UpdatedWhen)

<div class="widget-box">
    <div class="widget-header header-color-blue2">
        <h4 class="lighter smaller">ข้อมูลวิธีการจัดหา</h4>
    </div>
    <div class="widget-body">
        <div class="widget-body-inner">
            <div class="widget-main form-horizontal">
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("ประเภทการจัดหา")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                       @*@Html.DropDownListFor(model => model.PcTypeId, new SelectList(
                  new List<Object>{ 
                       new { value = 1 , text = "ซื้อ"  },
                       new { value = 2 , text = "จ้าง" },
                       new { value = 3 , text = "เช่า"},
                       new { value = 4 , text = "แลกเปลี่ยน"},
                       new { value = 5 , text = "ซ่อมบำรุง"},
                       new { value = 6 , text = "จ้างออกแบบและควบคุมงาน"},
                       new { value = 7 , text = "จ้างที่ปรึกษา"},
                       new { value = 8 , text = "จ้างเหมาบริการ"},
                       new { value = 9 , text = "จ้างผู้เชี่ยวชาญ"}
                    },
                  "value",
                  "text",
                   2))*@
                        @Html.DropDownListFor(model => model.PcTypeId, MasPurchaseMethodService.SelectListMethod()
                        , new { @class="chzn-select" })
						@Html.ValidationMessageFor(model => model.MasPurchaseType.PcTypeName)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("รายการวิธีจัดหา")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                         @Html.EditorFor(model => model.Name)
						@Html.ValidationMessageFor(model => model.Name)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("รายละเอียด")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                        @Html.EditorFor(model => model.Descr, "TextArea")
						@Html.ValidationMessageFor(model => model.Descr)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("เหตุผล")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                         @Html.EditorFor(model => model.Reason, "TextArea")
						@Html.ValidationMessageFor(model => model.Reason)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("ประกาศ")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                        @Html.RadioButtonFor(model => model.IsBid, true)<span class="lbl">  ใช้ประกาศ</span>
                        @Html.RadioButtonFor(model => model.IsBid, false, new { @checked = true })<span class="lbl">  ไม่ใช้ประกาศ</span>
                        @Html.ValidationMessageFor(model => model.IsBid)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("วงเงินต่ำสุด")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                         @Html.EditorFor(model => model.AmountMin)
						@Html.ValidationMessageFor(model => model.AmountMin)
                    </div>
                </div>
                <div class="control-group">
                    <div class="control-label">
                        @Html.DisplayName("วงเงินสูงสุด")
                    </div>
                    <div class="controls-detail" style="margin-top: 5px !important;">
                         @Html.EditorFor(model => model.AmountMax)
						@Html.ValidationMessageFor(model => model.AmountMax)
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>